package com.atguigu.yygh.user.controller.inner;

import com.atguigu.yygh.model.user.Patient;
import com.atguigu.yygh.user.service.PatientService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created with IntelliJ IDEA
 *
 * @Date: 2023/1/6 - 10:28
 * @Author: Hyoung
 * @Description:
 */
@Api(tags = "就诊人接口-供其他微服务远程调用")
@RestController
@RequestMapping("/inner/user/patient")
public class InnerPatientController {

    @Autowired
    private PatientService patientService;

    @ApiOperation("获取就诊人")
    @GetMapping("/get/{id}")
    public Patient getPatient(@PathVariable("id") Long id) {
        return patientService.getById(id);
    }
}